from rest_framework import serializers
from django.contrib.auth.models import Permission, Group


class GroupsPermissionSerializer(serializers.ModelSerializer):
    class Meta:
        model = Group
        fields = "__all__"


class PermissionGroupSerializer(serializers.ModelSerializer):
    class Meta:
        model = Permission
        fields = ("id", "name")

